package com.citybox.web.controller.aliyun;

import com.citybox.domain.aliyun.ALiYunAuthDo;
import com.citybox.infrastructure.aliyun.persistence.service.ALiYunService;
import com.citybox.shared.web.domain.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author zhao.x
 */
@Tag(name = "阿里云API控制器")
@RestController
@RequestMapping(value = "/aliyun")
@Slf4j
public class ALiYunController {

    @Resource
    private ALiYunService aLiYunService;

    @Operation(summary = "身份证二要素实名认证接口")
    @PostMapping("/userRealNameAuth")
    public R<Map<String, Object>> userRealNameAuth(@Valid @RequestBody ALiYunAuthDo aLiYunAuthDo) {
        return aLiYunService.userRealNameAuth(aLiYunAuthDo);
    }

}
